#ifndef gw_netnode_h
#define gw_netnode_h
#include <el.h>
#include "gw.h"
#include "netnode_params.h"

#define NETNODE_MAX 2

#define NN_TYPE_LAN 0
#define NN_TYPE_WAN 1

struct netnode {
  TAILQ_ENTRY(netnode) entry;
  
  int id;

  int use;
  int pktio;
  
  char name[MAX_NAME_LEN];
  int nn_type;
  
  struct nn_params params;
};

static inline bool valid_netnode_id(int id)
{
  return id >= 0 && id < NETNODE_MAX;
} 

struct netnode *netnode_get(int id);

bool netnode_send(int id, struct llbuf *ll);

bool netnode_show_params(int id);
void netnode_init(void);
void netnode_deinit(void);

#endif

